package com.thread;
/**
 * 
 * @author hangyuchao
 * @version depot - hyc at 2016-11-10
 * @description com.thread.TerminalBoxThread
 */

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class TerminalBoxThread extends Thread
{
	private static final Log log = LogFactory.getLog(TerminalBoxThread.class);

	private long interval = 60000L;// 间隔1分钟连接

	private boolean isStart = false;
	
	@Override
	public void run()
	{
		while (true)
		{
			try
			{
				if (!isStart)
				{
					Thread.sleep(120000L);// 首次启动等待2分钟
					this.isStart = true;
				}
				Thread.sleep(this.interval);
			}
			catch (InterruptedException e)
			{
				log.error(e);
			}
		}
	}
}
